<%@ include file="/common/taglibs.jsp"%>
<script>
jQuery(document).ready(function(){
	jQuery("#bulkEmail").validate();
	jQuery("#result").validate();
});
</script>
<div style="padding: 5px;" align="center">
	<br/><br/>
	<div align="left">
		<table>
			<tr>
				<td width="150px;" align="right"><span>Broadcast email to</span>&nbsp;</td>
				<td>
					<select id="broadcast" name="broadcast" onchange="showContentBroadCast()">
					  <option value="all">All</option>
					  <option value="choose">choose & BroadCast</option>
					</select>
				</td>
			</tr>
		</table>
	</div>
	<br/><br/>
	<div id="all">
		<s:form name="result" action="/broadcastEmail" id="result">
		<table border="0">
			<tr>
				<td width="100px;"  align="right">Subject</td>
				<td>
					<s:textfield name="email.subject" id="email_subject" cssClass="text large required " required="true" width="150px" />
				</td>
			</tr>
			<tr>
				<td width="100px;"  align="right">Body</td>
				<td>
					<s:textarea name="email.body" id="email_body" cssClass="text large required" required="true"  cols="18" rows="3" ></s:textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="right">
					<input type="submit" value="Broadcast" id="result_0" class="button-green">
				</td>
			</tr>
		</table>			
		</s:form>
	</div>
	<div id="choose" style="display:none;">
		<!-- <span style="font-size: 20px;">Choose and BroadCast</span><br/><br/><br/><br/> -->
			<s:form name="result" action="/broadcastEmail" id="result">
				<table border="0">
				 	<tr>
				 		<td width="100px;"  align="right">
			     			Class Name
			     		</td>
						<td>
							<s:select  name="classYear" id="classYear" emptyOption="true" list="classYears" listKey="id" displayName="Class" listValue="name" cssStyle="width:200px" />
						</td>
					</tr>
					<tr>
				 		<td width="100px;"  align="right">
			     			Section Name
			     		</td>
						<td>
							<s:select  name="sectionName" id="sectionName" emptyOption="true" list="sectionList" listKey="id" displayName="Section" listValue="sectionName" cssStyle="width:200px" />
						</td>
					</tr>
					<tr>
						<td width="100px;"  align="right">Subject</td>
						<td>
							<s:textfield name="email.subject" id="email_subject"  cssClass="text large required" required="true" width="150px" />
						</td>
					</tr>
					<tr>
						<td width="100px;"  align="right">Body</td>
						<td>
							<s:textarea name="email.body" id="email_body"  cssClass="text large required" required="true"  cols="18" rows="3" ></s:textarea>
						</td>
					</tr>		
					<tr>
						<td colspan="2" align="right">
							<input type="submit" value="Broadcast" id="result_0" class="button-green">
						</td>
					</tr>	
				</table>
			</s:form>
	</div>
</div>